ci: make CircleCI workflow routing declarative#21580
Merged
Merged
Conversation
9d09c3e to
09ace01
Compare
f6d6d94 to
e96f8fe
Compare
09ace01 to
e493fce
Compare
e96f8fe to
37ec546
Compare
e493fce to
d3ee186
Compare
37ec546 to
22c6f11
Compare
d3ee186 to
4cd111f
Compare
22c6f11 to
711b9b2
Compare
ac25283 to
32fe48d
Compare
Base automatically changed from
aj/refactor/circleci-extract-routing-script
to
develop
July 7, 2026 21:59
711b9b2 to
38c9f9f
Compare
sebastianst
approved these changes
Jul 8, 2026
sebastianst
left a comment
Member
There was a problem hiding this comment.
Behavior-preserving refactor — verified independently and with a specialized CI-config reviewer. The data/logic split is clean and the test-schedule-triggers.js change (reading YAML instead of regex-scraping the shell script) is a real robustness win.
Verification, all green:
test-decision-tree.sh→ 18/18 scenarios passshellcheck .circleci/scripts/*.sh→ cleanmerge-configs.sh+test-continuation-params.sh→ all params declaredapi_dispatchloop,detect/detect_all, andfinalizeall confirmed to preserve the exact prior outputs.
Approving. Left two optional, non-blocking nits inline.
🤖 Generated by Claude Code
Move the routing data (schedule->workflows, API dispatch flags, change-detection patterns, passthrough params) into a standalone routing.yml and have compute-workflow-conditions.sh read it, so the scripts hold only the routing logic. collect-params.sh now reads the change patterns from routing.yml, and test-schedule-triggers.js reads the schedule map directly instead of parsing the routing script.
e3b54e4 to
c956774
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Separates the CircleCI routing data from the routing logic. Stacked on #21579.
A new
.circleci/routing.ymlholds the declarative data:schedules— schedule name → workflowsapi_dispatch— dispatch flag → workflows (includingmain_dispatchandlabeled_pr, whose conditions stay in the script)change_patterns—any/allERE patterns matched against changed filespassthrough_params— params forwarded to continuation configscompute-workflow-conditions.shnow holds only the conditions;collect-params.shreads the change patterns fromrouting.yml; andtest-schedule-triggers.jsreads the schedule map directly instead of regex-parsing the routing script.No routing behavior changes — the same
c-run_*flags are enabled for every trigger/branch/schedule/dispatch case.Test plan
mise exec -- bash .circleci/scripts/test-decision-tree.sh— 19/19 scenarios pass (now readsrouting.yml)mise exec -- shellcheck .circleci/scripts/*.shmise exec -- bash .circleci/scripts/merge-configs.sh && mise exec -- bash .circleci/scripts/test-continuation-params.sh /tmp/merged-config.ymlmise exec -- bun build .circleci/scripts/test-schedule-triggers.js --outfile=/tmp/x.jsbun .circleci/scripts/test-schedule-triggers.js(live API portion needsCIRCLE_API_TOKEN)